Xbasic

UI_SHAPE_START_POLY Function

Syntax

V UI_SHAPE_START_POLY(C shape,N x,N y)

Arguments

shape

The name of the shape to draw.

x

The horizontal coordinate of the starting position. Larger values move right.

y

The vertical coordinate of the starting position. Larger values move down.

Description

The UI_SHAPE_START_POLY() function defines the starting point for a polygon shape drawn in memory. The SET_PEN()function sets the border color. The SET_BRUSH()function sets the fill color.

images/GR_ui_shape_start_poly.gif
ui_bitmap_create("test", 4, 2)
ui_bitmap_draw("test", <<%code%
set_origin(0,0)
inner_rect(0, 0, 4, 2)
set_pen("black")
set_brush("green")
ui_shape_start_poly("five", 1.5, .4)
ui_shape_lineto("five", 3, .75)
ui_shape_lineto("five", 2.3, 1.75)
ui_shape_lineto("five", 1.4, 1.65)
ui_shape_lineto("five", .75, 1)
ui_shape_poly("five", 1.5, .4)
fill_shape("five", 0,0)
%code%)
ui_dlg_box("", "{image=test}")

Limitations

This function is only used in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also